package com.gxl.design.abstractfactorypattern.factory;

import com.gxl.design.abstractfactorypattern.production.glass.Glass;
import com.gxl.design.abstractfactorypattern.production.mirror.Mirror;
import com.gxl.design.abstractfactorypattern.production.mirror.Amirror;
import com.gxl.design.abstractfactorypattern.production.mirror.Bmirror;

public class MirrorFactory extends AbstractFactory {

    @Override
    public Glass getGlassProducer(String prod) {
        return null;
    }

    @Override
    public Mirror getMirrorProducer(String lever) {

        if (lever.equals("")||lever==null){
            return null;
        }

        if(lever.equals("A")){
            return new Amirror();
        }

        if (lever.equals("B")){
            return new Bmirror();
        }
        return null;
    }
}
